﻿<Window x:Class="Attacher.MainWindow"
		
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:tb="http://www.hardcodet.net/taskbar"
		xmlns:attacher="clr-namespace:Attacher"

		mc:Ignorable="d" 

		WindowStyle="None"
		Background="Transparent"
		ShowInTaskbar="False"
		
		d:DataContext="{d:DesignInstance Type=attacher:MainWindowViewModel}">

	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="ContextMenuStyle.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Window.Resources>
	
	<Grid>
		<tb:TaskbarIcon Visibility="Visible" IconSource="Attach.ico" x:Name="TaskbarIcon" x:FieldModifier="internal" >
			<tb:TaskbarIcon.ContextMenu>
				<ContextMenu Style="{StaticResource Pepe}" >
					<attacher:ContextMenuHeaderAttachedProperty.Header>
						<Border BorderThickness="1" >
							<StackPanel Background="{StaticResource ContentAreaColorLightBrush}">
								<TextBlock Text="Visual Studio Attacher" FontWeight="Heavy" HorizontalAlignment="Center" />
								<TextBlock Text="{Binding HotKeyText, StringFormat=(Press {0} to attach to}" FontStyle="Italic" Margin="5,0,0,0" FontWeight="Light" HorizontalAlignment="Center" />
								<TextBlock Text="the focused application)" FontStyle="Italic" Margin="0,0,0,5" FontWeight="Light" HorizontalAlignment="Center" />
							</StackPanel>
						</Border>
					</attacher:ContextMenuHeaderAttachedProperty.Header>
					
					<ContextMenu.Items>
						<MenuItem Header="Auto Start" IsCheckable="True" Command="{Binding ChangeAutoStartCommand}" IsChecked="{Binding IsAutoStartEnabled, Mode=OneWay}" />
						<Separator/>
						<MenuItem Header="Exit" Command="{Binding ExitCommand}" />
					</ContextMenu.Items>
				</ContextMenu>
			</tb:TaskbarIcon.ContextMenu>
		</tb:TaskbarIcon>
	</Grid>
</Window>
